package com.serviceprovider.business.module.admin.bonus.model;

//~--- JDK imports ------------------------------------------------------------

import java.util.Date;

public class PayBonusForm {
    private Integer bonusId;
    private Double  payAmount;
    private Integer payAs;
    private String  payMode;
    private Date    payOn;
    private Double  payWhen;
    private Integer userId;

    @Override
    public boolean equals(Object obj) {
        if ((obj == null) ||!(obj instanceof PayBonusForm)) {
            return false;
        }

        PayBonusForm b  = (PayBonusForm) obj;
        boolean      eq = ((bonusId == null) && (b.bonusId == null)) || ((bonusId != null) && bonusId.equals(b.bonusId));

        if (!eq) {
            return false;
        }

        eq = ((userId == null) && (b.userId == null)) || ((userId != null) && userId.equals(b.userId));

        if (!eq) {
            return false;
        }

        eq = ((payOn == null) && (b.payOn == null)) || ((payOn != null) && payOn.equals(b.payOn));

        if (!eq) {
            return false;
        }

        eq = ((payWhen == null) && (b.payWhen == null)) || ((payWhen != null) && payWhen.equals(b.payWhen));

        if (!eq) {
            return false;
        }

        eq = ((payAs == null) && (b.payAs == null)) || ((payAs != null) && payAs.equals(b.payAs));

        if (!eq) {
            return false;
        }

        eq = ((payMode == null) && (b.payMode == null)) || ((payMode != null) && payMode.equals(b.payMode));

        if (!eq) {
            return false;
        }

        eq = ((payAmount == null) && (b.payAmount == null)) || ((payAmount != null) && payAmount.equals(b.payAmount));

        if (!eq) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        int prime  = 31;
        int result = 1;

        result = prime * result + ((bonusId == null)
                                   ? 0
                                   : bonusId.hashCode());
        result = prime * result + ((userId == null)
                                   ? 0
                                   : userId.hashCode());
        result = prime * result + ((payOn == null)
                                   ? 0
                                   : payOn.hashCode());
        result = prime * result + ((payWhen == null)
                                   ? 0
                                   : payWhen.hashCode());
        result = prime * result + ((payAmount == null)
                                   ? 0
                                   : payAmount.hashCode());
        result = prime * result + ((payAs == null)
                                   ? 0
                                   : payAs.hashCode());
        result = prime * result + ((payMode == null)
                                   ? 0
                                   : payMode.hashCode());

        return result;
    }

    public Integer getBonusId() {
        return bonusId;
    }

    public void setBonusId(Integer bonusId) {
        this.bonusId = bonusId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Date getPayOn() {
        return payOn;
    }

    public void setPayOn(Date payOn) {
        this.payOn = payOn;
    }

    public Double getPayWhen() {
        return payWhen;
    }

    public void setPayWhen(Double payWhen) {
        this.payWhen = payWhen;
    }

    public Double getPayAmount() {
        return payAmount;
    }

    public void setPayAmount(Double payAmount) {
        this.payAmount = payAmount;
    }

    public Integer getPayAs() {
        return payAs;
    }

    public void setPayAs(Integer payAs) {
        this.payAs = payAs;
    }

    public String getPayMode() {
        return payMode;
    }

    public void setPayMode(String payMode) {
        this.payMode = payMode;
    }
}



